package com.sjgs.gis.domain;


import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;
import java.time.LocalDateTime;

@Builder
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@Data
@Table("schedule_job")
public class ScheduleJob implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    /**
     * 任务名称
     */
    @Column(value = "job_name")
    private String jobName;

    /**
     * cron表达式
     */
    @Column(value = "cron_expression")
    private String cronExpression;

    /**
     * 服务名称
     */
    @Column(value = "bean_name")
    private String beanName;

    /**
     * 方法名称
     */
    @Column(value = "method_name")
    private String methodName;

    /**
     * 参数类型列表
     */
    @Column(value = "parameter_types")
    private String parameterTypes = "";


    /**
     * 参数值列表
     */
    @Column(value = "parameters")
    private String parameters = "";

    /**
     * 状态 1.启动 2.暂停
     */
    @NonNull
    private int status = 1;

    /**
     * 是否删除 0.否 1.是
     */
    @Column(value = "delete_flag")
    private Integer deleteFlag = 0;

    /**
     * 创建人id
     */

    @Column(value = "creator_id")
    private Integer creatorId = 0;

    /**
     * 创建人
     */
    @Column(value = "creator_name")
    private String creatorName = "";

    /**
     * 创建时间
     */
    @Column(value = "created_time")
    private LocalDateTime createdTime = LocalDateTime.now();

    /**
     * 更新时间
     */
    @Column(value = "updated_time")
    private LocalDateTime updatedTime = LocalDateTime.now();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getParameters() {
        return parameters;
    }

    public void setParameters(String parameters) {
        this.parameters = parameters;
    }

    public String getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(String parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }
}